<!DOCTYPE html>
{% load i18n %}
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="shortcut icon" type="image/png" href="/static/favicon.ico"/>
    <link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
    <title>{% trans '首页' %}</title>
    <link rel="stylesheet" href="https://unpkg.com/mobi.css/dist/mobi.min.css">
</head>
<body>
<div class="flex-center">
    <div class="container">
        <div>
            {% if user.is_authenticated %}
            <p>{% trans '你已登录，欢迎你：' %}<a href="#">{{ user.username }}</a></p>
            <input type="hidden" id="userid" value={{user.id}}></input>
            <button class="btn btn-default"><a href="{% url 'users:logout' %}?next={{ request.path }}">{% trans '注销登录' %}</a>
            </button>
            <button class="btn btn-default"><a href="{% url 'users:password_change' %}?next={{ request.path }}">{% trans '修改密码' %}</a>
            </button>
            {% else %}
            <p>{% trans '你还没有登录，请' %}
                <button class="btn btn-default"><a href="{% url 'users:login' %}?next={{ request.path }}">{% trans '登录' %}</a>
                </button>
                    {% trans '或者' %}
                        <button class="btn btn-default"><a href="{% url 'users:register' %}?next={{ request.path }}">{% trans '注册' %}</a>
                </button>
            </p>
            {% endif %}
        </div>
    </div>
</div>
</body>
</html>
